﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Schedulingclasses.Infrastructure.Migrations
{
    public partial class db3 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "BanjiInfo",
                columns: table => new
                {
                    BanjiId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BanjiName = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_BanjiInfo", x => x.BanjiId);
                });

            migrationBuilder.CreateTable(
                name: "Branchschool",
                columns: table => new
                {
                    BranchschoolId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BranchschoolName = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Branchschool", x => x.BranchschoolId);
                });

            migrationBuilder.CreateTable(
                name: "ClassInfo",
                columns: table => new
                {
                    ClassId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ClassName = table.Column<int>(type: "int", nullable: true),
                    BranchschoolId = table.Column<int>(type: "int", nullable: true),
                    GradeId = table.Column<int>(type: "int", nullable: true),
                    Headteacher = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Num = table.Column<int>(type: "int", nullable: true),
                    Frequency = table.Column<int>(type: "int", nullable: true),
                    Course = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Lecturer = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Coursestarttime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    Graduationtime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ClassInfo", x => x.ClassId);
                });

            migrationBuilder.CreateTable(
                name: "GradeInfo",
                columns: table => new
                {
                    GradeId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    GradeName = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_GradeInfo", x => x.GradeId);
                });

            migrationBuilder.CreateTable(
                name: "instancce",
                columns: table => new
                {
                    instancceId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ClassId = table.Column<int>(type: "int", nullable: false),
                    BranchschoolName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    GradeName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BanjiName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    StatusId = table.Column<int>(type: "int", nullable: true),
                    Status = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Reason = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ApplicantId = table.Column<int>(type: "int", nullable: true),
                    ApplicantName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Nodenumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Nodename = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UserId = table.Column<int>(type: "int", nullable: true),
                    UserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Lowernode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Lowernodename = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    LoUserId = table.Column<int>(type: "int", nullable: true),
                    LoUserName = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_instancce", x => x.instancceId);
                });

            migrationBuilder.CreateTable(
                name: "ProcessInfo",
                columns: table => new
                {
                    ProcessId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ClassId = table.Column<int>(type: "int", nullable: false),
                    Nodenumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Nodename = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UserId = table.Column<int>(type: "int", nullable: true),
                    Username = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Uppernode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Lowernode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ProcessInfo", x => x.ProcessId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "BanjiInfo");

            migrationBuilder.DropTable(
                name: "Branchschool");

            migrationBuilder.DropTable(
                name: "ClassInfo");

            migrationBuilder.DropTable(
                name: "GradeInfo");

            migrationBuilder.DropTable(
                name: "instancce");

            migrationBuilder.DropTable(
                name: "ProcessInfo");
        }
    }
}
